home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / scsh-0.4 / scsh-0 / scsh-0.4.2 / debug / level-0.scm < prev    next >
Text File  |  1995-10-13  |  1KB  |  31 lines

  1. ; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees.  See file COPYING.
  2.  
  3.  
  4. ; Redefinitions of some usual Scheme things so as to make the new
  5. ; exception system kick in when it needs to.
  6.  
  7. (define (number? n)
  8.   (or ((structure-ref true-scheme number?) n)
  9.       (extended-number? n)))
  10.  
  11. ;(define (integer? n)
  12. ;  (if ((structure-ref true-scheme number?) n)
  13. ;      ((structure-ref true-scheme integer?) n)
  14. ;      (and (extended-number? n)
  15. ;           ... raise exception ...)))
  16.  
  17. (define (+ x y) ((structure-ref true-scheme +) x y))
  18. (define (* x y) ((structure-ref true-scheme *) x y))
  19. (define (- x y) ((structure-ref true-scheme -) x y))
  20. (define (/ x y) ((structure-ref true-scheme /) x y))
  21. (define (= x y) ((structure-ref true-scheme =) x y))
  22. (define (< x y) ((structure-ref true-scheme <) x y))
  23. (define (make-vector x y) ((structure-ref true-scheme make-vector) x y))
  24. (define (make-string x y) ((structure-ref true-scheme make-string) x y))
  25. (define (apply x y) ((structure-ref true-scheme apply) x y))
  26.  
  27. (define (read-char x) ((structure-ref true-scheme read-char) x))
  28. (define (peek-char x) ((structure-ref true-scheme peek-char) x))
  29. (define (char-ready? x) ((structure-ref true-scheme char-ready?) x))
  30. (define (write-char x y) ((structure-ref true-scheme write-char) x y))
  31.